<?php /* @var $this Controller */ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
		<?php 
			$cs=Yii::app()->clientScript;
			$cs->registerCoreScript('jquery');
		?>
		<meta http-equiv="Content-Type" content="text/html; charset=<?php echo Yii::app()->charset;?>" />
		
		<title><?php echo CHtml::encode($this->pageTitle);?></title>
		
		<!--                       CSS                       -->
	  
		<!-- Reset Stylesheet -->
		<link rel="stylesheet" href="<?php echo Yii::app()->theme->baseUrl;?>/resources/css/reset.css" type="text/css" media="screen" />
	  
		<!-- Main Stylesheet -->
		<link rel="stylesheet" href="<?php echo Yii::app()->theme->baseUrl;?>/resources/css/style.css" type="text/css" media="screen" />
		
		<!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
		<link rel="stylesheet" href="<?php echo Yii::app()->theme->baseUrl;?>/resources/css/invalid.css" type="text/css" media="screen" />	

		
	</head>
  
	<body>
	<div id="body-wrapper"> <!-- Wrapper for the radial gradient background -->
		
		<div id="sidebar"><div id="sidebar-wrapper"> <!-- Sidebar with logo and menu -->
			
			<h1 id="sidebar-title"><a href="#">Simpla Admin</a></h1>
		  
			<!-- Logo (221px wide) -->
			<a href="#"><img id="logo" src="<?php echo Yii::app()->theme->baseUrl;?>/resources/images/logo.png" alt="Simpla Admin logo" /></a>
		  
			<!-- Sidebar Profile links -->
			<div id="profile-links">
				Hello, <a href="#" title="Edit your profile"><?php echo (Yii::app()->user->name)?></a>, you have <a href="#messages" rel="modal" title="3 Messages">3 Messages</a><br />
				<br />
				<a href="#" title="View the Site">View the Site</a> 
				<?php if(!Yii::app()->user->isGuest):?>
				| <a href="<?php echo $this->createUrl("site/logout")?>" title="退出登陆">退出登陆</a>
				<?php endif;?>
			</div>
			<?php function setCurrent($Cid,$Aid)
			{
				echo ((Yii::app()->getController()->id==$Cid) && (Yii::app()->getController()->getAction()->id==$Aid))?"current":"normal";
			}?>
			<ul id="main-nav">  <!-- Accordion Menu -->		
				<li>
					<a href="<?php echo $this->createUrl("room/index")?>" class="nav-top-item <?php echo (Yii::app()->getController()->id=="room")?"current":"normal"?>">
						房间管理
					</a>
					
					<ul class="<?php echo (Yii::app()->getController()->id=="room")?"show":"hide"?>">
						<li><a href="<?php echo $this->createUrl("room/index")?>" class="<?php setCurrent("room","index");?>">房间列表</a></li>
						<li><a href="<?php echo $this->createUrl("room/addnew")?>" class="<?php setCurrent("room","addnew");?>">创建新房间</a></li>
					</ul>
				</li>
				
				<li>
					<a href="<?php echo $this->createUrl("user/index")?>" class="nav-top-item <?php echo (Yii::app()->getController()->id=="user")?"current":"normal"?>">
						用户管理
					</a>
					<ul class="<?php echo (Yii::app()->getController()->id=="user")?"show":"hide"?>">
						<li><a href="<?php echo $this->createUrl("user/index")?>" class="<?php setCurrent("user","index");?>">用户列表</a></li>
						<li><a href="<?php echo $this->createUrl("user/create")?>" class="<?php setCurrent("user","create");?>">添加新用户</a></li>
					</ul>
				</li>
				
				<li>
					<a href="<?php echo $this->createUrl("message/index")?>" class="nav-top-item <?php echo (Yii::app()->getController()->id=="message")?"current":"normal"?>"">
						消息管理
					</a>
					<ul class="<?php echo (Yii::app()->getController()->id=="message")?"show":"hide"?>" >
						<li><a href="<?php echo $this->createUrl("message/index")?>" class="<?php setCurrent("message","index");?>">消息列表</a></li>
						<li><a href="<?php echo $this->createUrl("message/create")?>" class="<?php setCurrent("message","create");?>">发送消息</a></li>
					</ul>
				</li>
				<li>
					<a href="<?php echo $this->createUrl("release/index")?>" class="nav-top-item <?php echo (Yii::app()->getController()->id=="release")?"current":"normal"?>"">
						发行版管理
					</a>
					<ul class="<?php echo (Yii::app()->getController()->id=="release")?"show":"hide"?>">
						<li><a href="<?php echo $this->createUrl("release/index")?>" class="<?php setCurrent("release","index");?>">发行版列表</a></li>
						<li><a href="<?php echo $this->createUrl("release/create")?>" class="<?php setCurrent("release","create");?>">发布发行版</a></li>
					</ul>
				</li>
				
				<li>
					<a href="<?php echo $this->createUrl("sysconf/index")?>" class="nav-top-item <?php echo (Yii::app()->getController()->id=="sysconf")?"current":"normal"?>"">
						系统设置
					</a>
					<ul class="<?php echo (Yii::app()->getController()->id=="sysconf")?"show":"hide"?>">
						<li><a href="<?php echo $this->createUrl("sysconf/index")?>" class="<?php setCurrent("sysconf","index");?>">系统配置</a></li>
						<li><a href="#">Design</a></li>
						<li><a href="#">Your Profile</a></li>
						<li><a href="#">Users and Permissions</a></li>
					</ul>
				</li>      
				
			</ul> <!-- End #main-nav -->
			
			<div id="messages" style="display: none"> <!-- Messages are shown when a link with these attributes are clicked: href="#messages" rel="modal"  -->
				
				<h3>3 Messages</h3>
			 
				<p>
					<strong>17th May 2009</strong> by Admin<br />
					Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue.
					<small><a href="#" class="remove-link" title="Remove message">Remove</a></small>
				</p>
			 
				<p>
					<strong>2nd May 2009</strong> by Jane Doe<br />
					Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est.
					<small><a href="#" class="remove-link" title="Remove message">Remove</a></small>
				</p>
			 
				<p>
					<strong>25th April 2009</strong> by Admin<br />
					Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue.
					<small><a href="#" class="remove-link" title="Remove message">Remove</a></small>
				</p>
				
				<form action="#" method="post">
					
					<h4>New Message</h4>
					
					<fieldset>
						<textarea class="textarea" name="textfield" cols="79" rows="5"></textarea>
					</fieldset>
					
					<fieldset>
					
						<select name="dropdown" class="small-input">
							<option value="option1">Send to...</option>
							<option value="option2">Everyone</option>
							<option value="option3">Admin</option>
							<option value="option4">Jane Doe</option>
						</select>
						
						<input class="button" type="submit" value="Send" />
						
					</fieldset>
					
				</form>
				
			</div> <!-- End #messages -->
			
		</div></div> <!-- End #sidebar -->
		
		<div id="main-content"> <!-- Main Content Section with everything -->
			<?php echo $content;?>
			<div id="footer">
				<small> <!-- Remove this notice or replace it with whatever you want -->
						&#169; Copyright 2009 Your Company | Powered by <a href="http://themeforest.net/item/simpla-admin-flexible-user-friendly-admin-skin/46073">Simpla Admin</a> | <a href="#">Top</a>
				</small>
			</div><!-- End #footer -->
			
		</div> <!-- End #main-content -->
		
	</div>
	<div id="loadingdiv"></div>
	</body>
  

<!-- Download From www.exet.tk-->
</html>
